﻿using System;
using BlueDot.Mobile.Core;

namespace TrackPreviousView.Views
{
    public partial class View1 : ViewBase
    {
        #region Fields

        private const string View1Shown = WellKnownActions.ViewShown + "/View1";
        private const string View1Showing = WellKnownActions.ViewShowing + "/View1";

        #endregion

        #region Constructors

        public View1()
        {
            InitializeComponent();
        }

        [DependencyConstructor]
        public View1(IMobileApplication application)
            : base(application)
        {
            InitializeComponent();
        }

        #endregion

        #region public


        /// <summary>
        /// This action receiver is called when View1 is shown.
        /// </summary>
        [Receiver(View1Shown)]
        public void OnView1Shown(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// This action receiver is called when View1 is showing.
        /// </summary>
        [Receiver(View1Showing)]
        public void OnView1Showing(object sender, EventArgs e)
        {
            // Replace the main menu on the shell with our view's menu
            ((Shell)Application.Shell).Menu = mainMenu;
        }

        #endregion
    }
}